package com.wolfsea.rvitemdecorationdemo.ui.dashboard
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.wolfsea.rvitemdecorationdemo.bean.Contact

class DashboardViewModel : ViewModel() {

    private val _text = MutableLiveData<String>().apply {
        value = "This is dashboard Fragment"
    }
    val text: LiveData<String> = _text

    private val dataSet = MutableLiveData<List<Contact>>().apply {
        value = (325..454).map {
            val ascii = it / 5
            Contact(ascii.toChar().toString(),"${ascii.toChar()} $it")
        }
    }
    val dashDataSet: MutableLiveData<List<Contact>> = dataSet

}